package com.csvw.skr.basic.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by Administrator on 2016/11/20.
 * 岗位
 */
@Entity
@Table(name = "csvw_skr_basic_organization")
public class Organization {
    /**
     * 组织编号
     */
    @Id
    @Column(name = "pk_code", length = 20, nullable = false)
    private String code;

    /**
     * 组织名称
     */
    @Column(name = "name", length = 50)
    private String name;

    /**
     * 老数据组织编号
     */
    @Column(length = 20 )
    private String oldcode;

    /**
     * 父组织编号
     */
    @Column(length = 20)
    private String pcode;

    /**
     * 是否总部
     */
    @Column(nullable=false, columnDefinition="int default 1")
    private int headquarters;

    /**
     * 组织级别
     */
    @Column(nullable=false, columnDefinition="int default 1")
    private int level;

    /**
     * 组织描述
     */
    @Column(name = "description", length = 200)
    private String description;

    /**
     * 数据是否有效
     */
    @Column(nullable=false, columnDefinition="bit default 1")
    private boolean active;

    /**
     * 数据创建时间
     */
    private Date created;

    /**
     * 数据更新时间
     */
    private Date updated;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOldcode() {
        return oldcode;
    }

    public void setOldcode(String oldcode) {
        this.oldcode = oldcode;
    }

    public String getPcode() {
        return pcode;
    }

    public void setPcode(String pcode) {
        this.pcode = pcode;
    }

    public int getHeadquarters() {
        return headquarters;
    }

    public void setHeadquarters(int headquarters) {
        this.headquarters = headquarters;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }
}
